package com.example.mobile2121606109ycg0516homework1;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class LoginActivity extends AppCompatActivity {

    private TextView tvLoginMessage;
    private Button btnLoginLogin;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        initView();

        Intent intent = getIntent();
        tvLoginMessage.setText(intent.getStringExtra("userName1"));


        btnLoginLogin.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent1 = new Intent(LoginActivity.this, LoginActivity.class);
                finish();
            }
        });
    }

    private void initView() {
        tvLoginMessage = (TextView) findViewById(R.id.tvLoginMessage);
        btnLoginLogin = (Button) findViewById(R.id.btnLoginLogin);
    }
}